package com.cong.project.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cong.project.model.entity.Product;
import com.cong.project.model.request.ProductAddRequest;
import com.cong.project.model.request.ProductSearchRequest;
import com.cong.project.model.request.TokenUserRequest;
import com.cong.project.model.vo.ProductDetailVo;
import com.cong.project.model.vo.ProductVo;

/**
* @author 86188
* @description 针对表【product(商品表)】的数据库操作Service
* @createDate 2022-11-02 14:28:15
*/
public interface ProductService extends IService<Product> {

    /**
     * 得到产品列表
     *
     * @param productSearchRequest 产品搜索请求
     * @param tokenUserRequest     令牌用户请求
     * @return {@link IPage}<{@link ProductVo}>
     */
    IPage<ProductVo> getProductList(ProductSearchRequest productSearchRequest, TokenUserRequest tokenUserRequest);

    /**
     * 添加产品
     *
     * @param productAddRequest 产品添加请求
     * @param tokenUserRequest  令牌用户请求
     * @return boolean
     */
    boolean addProduct(ProductAddRequest productAddRequest, TokenUserRequest tokenUserRequest);

    ProductDetailVo getProductDetail(Long productId, TokenUserRequest tokenUserRequest);
}
